><

Saving HTML fragments



Adobe GoLive lets you save parts of your Web page as HTML fragments--that is, chunks of ready-made HTML code that are not embedded in the default page structure. This feature is useful when you want to share parts of a page with other pages not necessarily in GoLive, because it eliminates the need to strip off redundant HTML page tags when you merge the code. HTML fragments are also instrumental in building dynamic pages with WebObjects (see the online manual Using Web Objects).

You can also save parts of your Web page as code snippets in the site window or as components that can be reused and dynamically updated in GoLive. See Using custom snippets and Using GoLive components for information.

To create an HTML fragment:

1 Choose File > New to create a new document.

2 Add the part of your Web page that you want to save as an HTML fragment.

3 Click the page icon () in the upper-left corner of the document window.

4 Choose Window > Inspector to open the Page Inspector and click the HTML tab.

5 Deselect the appropriate <html>, <head>, <title>, and <body> options to partly or completely strip the basic framework off the page.

6 Save the new document.

GoLive strips out the <HTML>, <HEAD>, <TITLE> (if empty) and <BODY> tags from the source code, leaving all other tags and attributes within the <BODY> tags intact.


Working in HTML > Saving HTML fragments